package com.bai.localshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bai.localshop.pojo.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单Mapper接口
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    /**
     * 查询超时未付款的订单列表
     * @return
     */
    @Select("select * from orders where status=#{status} and create_time<#{orderTime};")
    List<Order> getByStatusAndOrderTimeLT(Integer status, LocalDateTime orderTime);

}
